The ColorPicker Component > FColorPicker.setDataProvider() |
FColorPicker.setDataProvider()
Availability
Flash Player 6.
Usage
myPicker_cp.setDataProvider (dataProvider)
Parameters
dataProvider - An instance of the Array object specifying
the items to add, or an instance of the DataProvider class.
Returns
Nothing.
Description
Registers an outside object (dataProvider) as the data source
for the ColorPicker component. If dataProvider is an instance of
the Array object, the elements of the array simply have to be colors in hexidecimal
format (i.e. 0xRRGGBB). If dataProvider is an instance
of the DataProvider class, it must implement the DataProvider API defined in
the DataProvider symbol in the FlashUIComponents\CoreAssets\ClassTree folder
in the Library panel. The color should be stored as the "label" element
in each item of the dataProvider.
Example
The following code sets the data provider of a ColorPicker component:
colors_array = new Array(0xFF0000, 0x00FF00, 0x0000FF); myPicker_cp.setDataProvider(colors_array);
See also
FColorPicker.getDataProvider()